.home {
  height: 100vh;
  background-color: #f7fafc;
  overflow: hidden;
  position: relative;

  .home-title {
    text-align: center;
    font-size: 45rpx;
  }

  .home-search-box {
    width: 700rpx;
    height: 65rpx;
    margin: 0 auto;
    margin-top: 35rpx;
    background-color: #eeeeee;
    border-radius: 30rpx;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding-left: 30rpx;
    border: 5rpx solid #eeeeee;
    position: relative;

    .home-search-box-keyword {
      font-size: 25rpx;
      margin-left: 30rpx;
      color: #979797;
    }

    .home-search-box-button {
      font-size: 30rpx;
      height: 54rpx;
      width: 100rpx;
      background-color: #1989fa;
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 30rpx;
      margin-left: auto;
    }
  }

  .home-body {
    margin-top: 10rpx;
    box-sizing: border-box;
    padding-bottom: 30rpx;
    position: relative;

    .home-body-swipper-container {
      width: 700rpx;
      height: 240rpx;
      margin: 0 auto;
      margin-top: 15rpx;
      border-radius: 16rpx;
      overflow: hidden;

      .home-body-swipper-container-image {
        width: 700rpx;
        height: 240rpx;
      }
    }

    .home-body-quick-access-area {
      width: 710rpx;
      box-sizing: border-box;
      padding: 45rpx 10rpx;
      background-color: #fff;
      border-radius: 20rpx;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      row-gap: 40rpx;
      margin: 0 auto;
      margin-top: 20rpx;

      .home-body-quick-access-area-item {
        display: flex;
        flex-direction: column;
        align-items: center;

        .home-body-quick-access-area-icon {
          height: 80rpx;
          width: 80rpx;
        }

        .home-body-quick-access-area-text {
          margin-top: 20rpx;
          font-size: 25rpx;
        }
      }


    }

    .home-body-seckill {
      width: 710rpx;
      margin: 0 auto;
      margin-top: 20rpx;
      background-color: #fff;
      border-radius: 20rpx;
      padding-top: 25rpx;
      padding-bottom: 25rpx;
      box-sizing: border-box;
      overflow: hidden;

      .home-body-seckill-title {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
        padding-left: 20rpx;
        padding-right: 20rpx;

        .home-body-seckill-title-image {
          height: 40rpx;
          width: 160rpx;

        }

        .home-body-seckill-title-find-more {
          font-size: 30rpx;
          color: #1989fa;
        }
      }

      .home-body-seckill-products {
        display: flex;
        justify-content: space-around;
        margin-top: 10rpx;

        .home-body-seckill-products-item {
          display: flex;
          flex-direction: column;
          align-items: center;

          .home-body-seckill-products-item-image {
            width: 150rpx;
            height: 150rpx;
          }

          .home-body-seckill-products-item-seckill-price {
            color: #1989fa;
            display: flex;
            align-items: baseline;

            .home-body-seckill-products-item-original-price-text {
              font-size: 20rpx;
            }

            .home-body-seckill-products-item-seckill-price-symbol {
              font-size: 20rpx;
            }

            .home-body-seckill-products-item-seckill-price-value {
              font-size: 25rpx;
            }
          }

          .home-body-seckill-products-item-original-price {
            color: #c1c1c1;
            font-size: 20rpx;
            text-decoration: line-through;
            margin-top: 10rpx;

            .home-body-seckill-products-item-original-price-text {}

            .home-body-seckill-products-item-original-price-symbol {}

            .home-body-seckill-products-item-original-price-value {}
          }

          .home-body-seckill-products-item-progress-bar-container {
            width: 150rpx;
            background-color: #f8f8f8;
            border-radius: 20px;
            overflow: hidden;
            height: 8px;
            margin-top: 10rpx;

            .home-body-seckill-products-item-progress-bar {
              width: 70%;
              height: 100%;
              background: linear-gradient(120deg, #e1f5fe 0%, #b3e5fc 35%, #81d4fa 65%, #4fc3f7 100%);
              border-radius: 20px;
              transition: width 0.5s ease;
            }
          }

          .home-body-seckill-products-item-sold {
            font-size: 30rpx;
            color: #929393;
            margin-top: 10rpx;
          }
        }
      }
    }

  }

}

.home-body-tab {
  width: 710rpx;
  margin: 0 auto;
  margin-top: 20rpx;

  .home-body-tab__content {
    display: flex;
    gap: 25rpx;

    .home-body-tab-item {
      font-size: 30rpx;
      background-color: #fff;
      padding: 20rpx;
      white-space: nowrap;
      border-radius: 20rpx;
      color: #666666;
    }

    .home-body-tab-active-item {
      background-color: #4fc3f7;
      color: #fff;
    }
  }
}


.home-body-product-list {
  box-sizing: border-box;
  padding-left: 20rpx;
  padding-right: 20rpx;
  margin-top: 20rpx;
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 20rpx;
  column-gap: 25rpx;

  .home-body-product-list-item {
    background-color: #fff;
    height: 540rpx;
    border-radius: 20rpx;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;

    .home-body-product-list-item-image {
      text-align: center;
      border-radius: 20rpx;
      border: 1rpx solid #1989fa;
      overflow: hidden;
    }

    .home-body-product-list-item-image-no-stock {
      text-align: center;
      border-radius: 20rpx;
      border: 1rpx solid #1989fa;
      overflow: hidden;
      position: relative;

      &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.6);
        /* 黑色半透明层，实现灰色滤镜效果 */
      }

      .home-body-product-list-item-image-no-stock-icon {
        position: absolute;
        z-index: 999;
        top: 50%; 
        left: 50%; 
        transform: translate(-50%, -50%);
        font-size: 25rpx;
        color: #fff;
        background-color: #999;
        width: 100rpx;
        height: 100rpx;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        padding: 5rpx;
        box-sizing: border-box;
        border: 5rpx solid #d6dbd9; 
      }
    }

    .home-body-product-list-item-product-name {
      margin-top: 18rpx;
      box-sizing: border-box;
      width: 100%;
      padding: 0 15rpx;
      font-weight: bold;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .home-body-product-list-item-product-tip {
      font-size: 23rpx;
      width: 100%;
      box-sizing: border-box;
      padding: 0 15rpx;
      margin-top: 15rpx;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .home-body-product-list-item-price {
      display: flex;
      align-items: baseline;
      margin-top: 30rpx;
      width: 100%;
      box-sizing: border-box;
      padding: 0 15rpx;

      .home-body-product-list-item-price-discount {
        display: flex;
        align-items: baseline;
        color: #e44544;

        .home-body-product-list-item-price-discount-symbol {
          font-size: 18rpx;
        }

        .home-body-product-list-item-price-discount-value {
          font-size: 30rpx;
        }
      }

      .home-body-product-list-item-price-original {
        display: flex;
        font-size: 18rpx;
        color: #9a9a9a;
        text-decoration: line-through;
        margin-left: 10rpx;

        .home-body-product-list-item-price-original-symbol {}

        .home-body-product-list-item-price-original-value {}
      }
    }

    .home-body-product-list-item-shopping-cart-icon {
      position: absolute;
      right: 15rpx;
      bottom: 20rpx;
      background-color: #1989fa;
      padding: 10rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 999rpx;
    }
  }
}

.home-body-another-tab {
  position: absolute;
  z-index: 999;
  background-color: #f7f7f8;
  width: 100vw;
  box-sizing: border-box;
  padding: 10rpx 20rpx;
  height: 100rpx;

  .home-body-tab__content {
    display: flex;
    gap: 25rpx;

    .home-body-tab-item {
      font-size: 30rpx;
      background-color: #fff;
      padding: 20rpx;
      white-space: nowrap;
      border-radius: 20rpx;
      color: #666666;
    }

    .home-body-tab-active-item {
      background-color: #4fc3f7;
      color: #fff;
    }
  }
}